<include file="../Public/header" />
<link href="{:APPS_URL}/w3g/_static/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
  body{background-color: #f8f8f8;}
</style>
<div id="content">
    <div id="weiba" data-title="微吧" class="panel" data-selected="true"  data-menu="msgmenu" style="padding:0;">
        <header>
            <div id="header-buttons">
                <div id="messageLink" class="header-menu-link"><a href="{:U('w3g/Index/msgbox')}"><i class="num"></i></a></div>
        <div id="menuLink" class="header-menu-link"></div>
                <!--<div id="otherLink">
                    <a id="writeLink" class="header-menu-link" href="{:U('w3g/Weiba/quickPost')}"></a>
                    <a id="spaceLink" class="header-menu-link" href="javascript:;"></a>
                </div>-->
            </div>
            <h1 class="">
                我的微吧
            </h1>
        </header>
        <div class="mainWeiba">
            <div class="tab">
                <ul>
                    <li><a href="{:U('w3g/Weiba/index')}">推荐</a></li>
                    <li><a href="{:U('w3g/Weiba/forum')}">微吧</a></li>
                    <li class="current"><a href="{:U('w3g/Weiba/my')}" class="noborder">我的</a></li>
                </ul>
            </div>
    <div class="weiba_forumlist">
      <php>if($type == 'index'):</php>
      <div class="navlist">
        <ul>
            <li><a href="{:U('w3g/Weiba/my', array('type'=>'myWeiba'))}">我关注的微吧</a></li>
            <li><a href="{:U('w3g/Weiba/my', array('type'=>'myFollowing'))}">我关注的微吧帖子</a></li>
            <li><a href="{:U('w3g/Weiba/my', array('type'=>'myPost'))}">我发表的帖子</a></li>
            <li><a href="{:U('w3g/Weiba/my', array('type'=>'myReply'))}">我回复的帖子</a></li>
            <li><a href="{:U('w3g/Weiba/my', array('type'=>'myFavorite'))}">我收藏的帖子</a></li>
        </ul>
      </div>
      <php>elseif($type == 'myWeiba'):</php>
      <div class="section">
        <div class="slt">我关注的微吧({$post_list.totalRows})</div>
        <div class="slc clearfix">
          <div class="bklist">
            <php>if(!$post_list['data']):</php>
            <div class="nodata">你还没有关注的微吧！</div>
            <php>else:</php>
            <volist name="post_list.data" id="vo">
                <dl>
                  <dt>
                    <a href="{:U('w3g/Weiba/detail',array('weiba_id'=>$vo['weiba_id']))}">
                      <img width="70" height="70" src="{$vo.avatar_middle}">
                    </a>
                  </dt>
                  <dd>
                    <h3>
                      <a title="{$vo.weiba_name}" href="{:U('w3g/Weiba/detail',array('weiba_id'=>$vo['weiba_id']))}">   {$vo.weiba_name}
                      </a>
                    </h3>
                  </dd>
                </dl>
            </volist>
            <php>endif;</php>
          </div>
        </div>
      </div>
      <php>else:</php>
      <div class="section">
        <php>
            $arrs = array('myPost'=>'我发表的帖子','myReply'=>'我回复的帖子','myFavorite'=>'我收藏的帖子','myFollowing'=>'我关注的微吧的帖子');
        </php>
        <div class="slt">{$arrs[$type]}({$post_list.totalRows})</div>
        <div class="slc clearfix">
          <div class="bklist">
              <php>if(!$post_list['data']):</php>
              <div class="nodata">{:str_replace('我','你还没有',$arrs[$type])}!</div>
              <php>else:</php>
              <div class="weiba_postlist">
                  <ul id="listData">
                    <volist name="post_list.data" id="vo">
                    <li onclick="javascript:window.open('{:U('w3g/Weiba/postDetail',array('post_id'=>$vo['post_id']))}','_self')">
                        <div class="name">
                            <php>if($vo['top']==2||$vo['top']==1){</php><i class="ico-bar-top">顶</i><php>}</php><php>if($vo['recommend']){</php><i class="ico-bar-recd">荐</i><php>}</php><php>if($vo['digest']==1){</php><i class="ico-bar-fine">精</i><php>}</php>
                            <a href="{:U('w3g/Weiba/postDetail',array('post_id'=>$vo['post_id']))}"><span>{$vo.title}</span><!--<php>if(preg_match('/<img/i',$vo['content'])){</php><i class="ico-img"><img class="icons" width="16" src="{:APPS_URL}/w3g/_static/images/ico-img.png"></i><php>}</php></a>-->
                        </div>
                        <div class="info clearfix">
                            <div class="left">
                                <a href="{:U('w3g/Index/profile','uid='.$vo['post_uid'])}">{$vo.user.uname}</a>&nbsp;-&nbsp;<span>{$vo.post_time|friendlyDate}</span>
                            </div>
                            <div class="right">
                            <php>if($vo['reply_count']>0){</php><span class="plnum">{$vo.reply_count}</span><php>if($vo['read_count']>0){echo '　/　';}}if($vo['read_count']>0){</php><span class="llnum">{$vo.read_count}</span><php>}</php>
                            </div>
                        </div>
                    </li>
                    </volist>
                  </ul>
                  <php>if($post_list['totalPages']>1):</php>
                  <div id="pager_box">
                    <php>if($post_list['nowPage']>1):</php>
                    <a href="{:U('w3g/Weiba/detail',array('weiba_id'=>$weiba_detail['weiba_id'],'type'=>$type,'page'=>$post_list['nowPage']-1))}" id="prev" class="pure-button pager_child pager_p_n pure-button-primary">上一页</a>
                    <php>endif;</php>
                    <php>if($post_list['nowPage']<$post_list['totalPages']):</php>
                    <a href="{:U('w3g/Weiba/detail',array('weiba_id'=>$weiba_detail['weiba_id'],'type'=>$type,'page'=>$post_list['nowPage']+1))}" id="next" class="pure-button pager_child pager_p_n pure-button-primary">下一页</a>
                    <php>endif;</php>
                  </div>
                  <php>endif;</php>
                </div>
              <php>endif;</php>
          </div>
        </div>
      </div>
        <php>endif;</php>
    </div>

<script>

</script>

        </div>
    </div>
<include file="../Public/footer" />